document.styleSheets[0].insertRule('@keyframes fadeIn {0% {opacity: 0; }35% {opacity: 1;}70% {opacity: 1;}100% {opacity: 0; }}',0);
document.styleSheets[0].insertRule('@-webkit-keyframes fadeIn {0% {opacity: 0; }30% {opacity: 1;}70% {opacity: 1;}100% {opacity: 0; }}',0);

var xxinner='<div id="xxpopup" style="z-index:9;position: fixed;top: 0.8rem;left: 0.6rem;width: 4.9rem;height: .6rem;background: rgba(0,0,0,0.5);border-radius: .3rem;padding: .04rem;opacity: 0;">'
		+		'<div id="xximg" style="width: .5rem;height: 100%;border-radius: .25rem;background: #fff;"></div>'
		+		'<div style="position: absolute;left: .7rem;top:0;width: 4.5rem;height: .6rem;line-height: .6rem;color: #fff;font-size: .22rem;">'
		+			'<p id="xxname" style="float: left;width: 1.5rem;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">星美专业订单</p>'
		+			'<p id="xxcontent" style="float: left;margin-left: .05rem;width: 1.4rem;">下了1笔订单</p>'
		+			'<p id="xxtime" >6秒前</p>'
		+			'<p  style="height:0;clear: both;display: block;"></p>'
		+		'</div>'
		+ 	'</div>'
		
var xxpopup=document.createElement("div");
	xxpopup.innerHTML=xxinner;
	document.body.appendChild(xxpopup);
	
	function xxmessage(img,name,content,time){
			document.getElementById("xximg").innerHTML='<img src="'+img+'"  style="width:100%;height:100%;border-radius: 50%;" />';
			document.getElementById("xxname").innerHTML=name;
			document.getElementById("xxcontent").innerHTML=content;
			document.getElementById("xxtime").innerHTML=time;
			document.getElementById("xxpopup").style.animation='fadeIn 3s 1';
			document.getElementById("xxpopup").style.webkitAnimation='fadeIn 3s 1';
			setTimeout(function(){
				document.getElementById("xxpopup").style.animation='';
				document.getElementById("xxpopup").style.webkitAnimation='';
			},2500);
			
	}
	
